package com.caltco.cargo.ops.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.caltco.cargo.ops.modules.sys.config.JsonTypeHandler;
import com.caltco.cargo.ops.modules.sys.entity.List.Meaning;
import com.caltco.cargo.ops.modules.sys.entity.List.RelWord;
import com.caltco.cargo.ops.modules.sys.entity.List.Synonyms;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@TableName("words")
@Schema(description = "用户实体类")
public class Word implements Serializable {

    private static final long serialVersionUID = 1L;
    @Schema(description = "单词Id")
    private Long id;

    @Schema(description = "单词序号")
    @TableField("word_rank")
    @JsonProperty("wordRank")
    private Integer wordRank;

    @Schema(description = "单词")
    @TableField("head_word")
    @JsonProperty("headWord")
    private String headWord;

    @Schema(description = "单词短语")
    private String sentences;

    @Schema(description = "音标")
    private String phonetic;

    @Schema(description = "单词意思")
    @TableField(typeHandler = JsonTypeHandler.class)
    private List<Meaning> meaning;

    @Schema(description = "单词近义词")
    @TableField(typeHandler = JsonTypeHandler.class)
    private List<Synonyms> synonyms;

    @Schema(description = "同根词")
    @JsonProperty("relWord")
    @TableField(typeHandler = JsonTypeHandler.class)
    private List<RelWord> relWord;

    @Schema(description = "单词类型")
    @TableField("word_type")
    @JsonProperty("wordType")
    private String wordType;
}
